define(['durandal/system','knockout'],function (system,ko) {
	var childView=ko.observable();
	var prefix='第二层：';
	var i=0;
	function changeChildView () {
		var path1='app-main/parent-and-children/modules/third/index';
		var path2 = 'app-main/parent-and-children/modules/third2/index';
		childView(i%2==0?path1:path2);
		i+=1;
	}
	return {
		childView:childView,
		changeChildView:changeChildView,
		getView:function(){
			system.log('%clife%s-getView','color:green;',prefix);
		},
		activate: function() {
			system.log('%clife%s-activate','color:green;',prefix);
		},
		binding: function(child, parent, settings) {
			system.log('%clife%s-binding','color:green;',prefix);
		},
		bindingComplete: function() {
			system.log('%clife%s-bindingComplete','color:green;',prefix);
		},
		attached: function(child, parent, settings) {
			system.log('%clife%s-attached','color:green;',prefix);
		},
		compositionComplete: function(child, parent, settings) {
			system.log('%clife%s-compositionComplete','color:green;',prefix);
		},
		detached: function() {
			system.log('%clife%s-detached','color:green;',prefix);
		}
	}
})